<?php
/**
 * Created by PhpStorm.
 * User: yangfan
 * Date: 2019/11/16
 * Time: 5:40 PM
 */

namespace App\BO;

class PipelineConfig
{
    /**
     * 执行方法名
     * @var string
     */
    private $handle = 'check';

    /**
     * 条件数组
     * @var array
     */
    private $pipes = [];

    /**
     * @var \Closure
     */
    private $closure;

    public function __construct()
    {
        $this->closure = function () {
            return true;
        };
    }

    /**
     * @return string
     */
    public function getHandle(): string
    {
        return $this->handle;
    }

    /**
     * @param string $handle
     */
    public function setHandle(string $handle): void
    {
        $this->handle = $handle;
    }

    /**
     * @return array
     */
    public function getPipes(): array
    {
        return $this->pipes;
    }

    /**
     * @param array $pipes
     */
    public function setPipes(array $pipes): void
    {
        $this->pipes = $pipes;
    }

    /**
     * @return \Closure
     */
    public function getClosure(): \Closure
    {
        return $this->closure;
    }

    /**
     * @param \Closure $closure
     */
    public function setClosure(\Closure $closure): void
    {
        $this->closure = $closure;
    }
}
